<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增辅料出入库明细')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-add" th:object="${partIngredients}">
            <input name="partId" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label ">辅料名称：</label>
                <div class="col-sm-8">
                    <input disabled="disabled" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label ">子名称：</label>
                <div class="col-sm-8">
                    <input  disabled="disabled" th:field="*{subName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">库存数量：</label>
                <div class="col-sm-8">
                    <input disabled="disabled"  th:field="*{inventory}" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入库数量：</label>
                <div class="col-sm-8">
                    <input name="changeValue" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">入库时间：</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control time-input" id="startTime" placeholder="入库时间" name="receiveTimr"/>
                      <!-- <input type="text" name="receiveTimr" class="form-control" id="startTime" placeholder="yyyy-MM-dd"> -->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
   	<!-- laydate示例 -->
/* 	layui.use('laydate', function(){
		  var laydate = layui.laydate;
		  
		  laydate.render({ 
		    elem: '#startTime',
		    type: 'date'
		    //trigger: 'click'
		  });
		  
		
	   }); */
	
	
     		  
        var prefix = ctx + "system/detail"
        $("#form-detail-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/inStore", $('#form-detail-add').serialize());
            }
        }
    </script>
</body>
</html>